package com.may.rabbitmq.consumer.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author May
 * @date 2021/04/01 13:42
 */
@Component
@RabbitListener(queues = "fanoutQueue")
public class FanoutReceiver {
    @RabbitHandler
    public void process(Map<String, Object> msg) {
        System.out.println("接收到消息：" + msg.toString());
    }
}
